package Library.Events;

import java.awt.event.*;
import Library.Game.*;
import java.util.*;

/**
 *
 */
public class AttackEvent extends ActionEvent
{
    /**
     *
     * @param source
     * @param id
     * @param command
     * @param attPlayer
     * @param attLandId
     * @param attDices
     * @param lostAttArmies
     * @param defPlayer
     * @param defLandId
     * @param defDices
     * @param lostDefArmies
     */
    public AttackEvent(Object source, int id, String command,
	    IPlayer attPlayer, int attLandId, List<Integer> attDices, int lostAttArmies, 
	    IPlayer defPlayer, int defLandId, List<Integer> defDices, int lostDefArmies)
    {
	super(source, id, command);
	m_Attacker = attPlayer;
	m_AttackerLandID = attLandId;
	m_AttackerDices = attDices;
	m_AttackerLost = lostAttArmies;

	m_Defender = defPlayer;
	m_DefenderLandID = defLandId;
	m_DefenderDices = defDices;
	m_DefenderLost = lostDefArmies;
    }
    
    /**
     *
     * @param source
     * @param id
     * @param command
     * @param modifiers
     * @param attPlayer
     * @param attLandId
     * @param attDices
     * @param lostAttArmies
     * @param defPlayer
     * @param defLandId
     * @param defDices
     * @param lostDefArmies
     */
    public AttackEvent(Object source, int id, String command, int modifiers,
	    IPlayer attPlayer, int attLandId, List<Integer> attDices, int lostAttArmies, 
	    IPlayer defPlayer, int defLandId, List<Integer> defDices, int lostDefArmies)
    {
	super(source, id, command, modifiers);
	m_Attacker = attPlayer;
	m_AttackerLandID = attLandId;
	m_AttackerDices = attDices;
	m_AttackerLost = lostAttArmies;

	m_Defender = defPlayer;
	m_DefenderLandID = defLandId;
	m_DefenderDices = defDices;
	m_DefenderLost = lostDefArmies;
    }
    
    /**
     *
     * @param source
     * @param id
     * @param command
     * @param when
     * @param modifiers
     * @param attPlayer
     * @param attLandId
     * @param attDices
     * @param lostAttArmies
     * @param defPlayer
     * @param defLandId
     * @param defDices
     * @param lostDefArmies
     */
    public AttackEvent(Object source, int id, String command, long when, int modifiers,
	    IPlayer attPlayer, int attLandId, List<Integer> attDices, int lostAttArmies, 
	    IPlayer defPlayer, int defLandId, List<Integer> defDices, int lostDefArmies)
    {
	super(source, id, command, when, modifiers);
	m_Attacker = attPlayer;
	m_AttackerLandID = attLandId;
	m_AttackerDices = attDices;
	m_AttackerLost = lostAttArmies;

	m_Defender = defPlayer;
	m_DefenderLandID = defLandId;
	m_DefenderDices = defDices;
	m_DefenderLost = lostDefArmies;
    }
    
    private IPlayer m_Attacker;
    /**
     *
     * @return
     */
    public IPlayer getAttacker()
    {
	return m_Attacker;
    }
    
    private int m_AttackerLandID;
    /**
     *
     * @return
     */
    public int getAttackerLandID()
    {
	return m_AttackerLandID;
    }
    
    private List<Integer> m_AttackerDices;
    /**
     *
     * @return
     */
    public List<Integer> getAttackerDices()
    {
	return m_AttackerDices;
    }
    
    private int m_AttackerLost;
    /**
     *
     * @return
     */
    public int getAttackerLost()
    {
	return m_AttackerLost;
    }
    
    private IPlayer m_Defender;
    /**
     *
     * @return
     */
    public IPlayer getDefender()
    {
	return m_Defender;
    }
    
    private int m_DefenderLandID;
    /**
     *
     * @return
     */
    public int getDefenderLandID()
    {
	return m_DefenderLandID;
    }
    
    private List<Integer> m_DefenderDices;
    /**
     *
     * @return
     */
    public List<Integer> getDefenderDices()
    {
	return m_DefenderDices;
    }
    
    private int m_DefenderLost;
    /**
     *
     * @return
     */
    public int getDefenderLost()
    {
	return m_DefenderLost;
    }
}
